Compound-eye distance measurement apparatuses that image a measurement object using two imaging apparatuses placed horizontally or vertically, and measure the distance to the object based on the parallax between two horizontally or vertically arranged images, are used for measurement of the distance between cars, autofocus systems for cameras, three-dimensional shape measurement systems, and so on. Such compound-eye distance measurement apparatuses are provided with a compound-eye optical system that forms an image of the object on an imaging element.
As one such compound-eye distance measurement apparatus, an apparatus is known that uses a horizontal (or vertical) pair of lenses to form an image of an object on a horizontal (or vertical) pair of imaging elements, respectively, thereby capturing two images (Patent Document 1).
With a compound-eye distance measurement apparatus, the parallax is extracted by pattern matching from two captured images, and the distance to a measurement object is calculated based on a principle of triangulation.
The method of pattern matching will be described with reference to FIG. 20. Numerals 91 and 92 denote a pair of images obtained using a horizontal pair of imaging optical systems. A block (small region) 91a is set in an image (standard image) 91 obtained from a first imaging optical system. A block 92a having the same y-coordinate value and the same size as the block 91a is set in an image (reference image) 92 obtained from a second imaging optical system. The sum of the finite differences (absolute values) between the luminance value of the pixels constituting the block 91a in the standard image and the luminance value of the pixels constituting the block 92a in the reference image is determined using Formula 1 below as an evaluation function SAD (Sum of Absolute Difference).
                              S          ⁢                                          ⁢          A          ⁢                                          ⁢          D                =                              ∑                          i              =              0                                      m              -              1                                ⁢                                    ∑                              j                =                0                                            n                -                1                                      ⁢                                                                          I                  ⁢                                                                          ⁢                  0                  ⁢                                      (                                                                  x                        +                        i                                            ,                                              y                        +                        j                                                              )                                                  -                                  I                  ⁢                                                                          ⁢                  1                  ⁢                                      (                                                                  x                        +                        dx                        +                        i                                            ,                                              y                        +                        j                                                              ⁢                                                                                  )                                                                                                                        [                  Formula          ⁢                                          ⁢          1                ]            
In Formula 1, x and y are the x-coordinate value and the y-coordinate value on an imaging surface, and I0 and I1 are the luminance values of the pixels at the coordinates shown in the parentheses in the standard image and the reference image, respectively. The blocks 91a and 92a each have m (in the X-axis direction)×n (in the Y-axis direction) pixels.
The SAD is calculated while varying the movement amount dx in the base line direction (in the present example, the X-axis direction) 90 of the block 92a in the reference image 92. The value of dx with which the SAD takes a local minimum is extracted as the parallax amount with the block 91a. The movement range (search range) of the small region 92a in the reference image 92 is set according to the range of distance measurement. Since the SAD can be calculated for arbitrary coordinates in the standard image 91 by setting the block 91a in an arbitrary position in the standard image 91, it is possible to obtain the parallax amount (distance information) over the entire range of the imaging field. It is also possible to determine the parallax distribution in the standard image 91 by dividing the standard image 91 into a plurality of blocks in a matrix configuration, and carrying out the above-described pattern matching for each of the blocks.
When the distance to an object is measured using such a compound-eye distance measurement apparatus during the nighttime, it is necessary to perform imaging while irradiating the object with light using an auxiliary light source. Furthermore, for the cases where the object is of low contrast both at day and night, a technique is commonly known in which a contrast between lightness and darkness is given to the object by projecting light with a predetermined pattern onto the object using an auxiliary light source, in order to increase the accuracy of distance measurement (Patent Document 2).    Patent Document 1: JP H4-043911A    Patent Document 2: JP2001-264033A